package com.facebook.react.modules.network;

import com.facebook.react.bridge.ReactApplicationContext;

import okhttp3.OkHttpClient;

/**
 * <pre>
 *     author : ADMIN
 *     e-mail : wenju.tian@deltaww.com
 *     time   : 2019/10/08
 *     desc   :
 *     version: 1.0
 * </pre>
 */
public class NetworkingModuleUtils {

  public static NetworkingModule createNetworkingModuleWithCustomClient(ReactApplicationContext context) {

    OkHttpClient client = UnsafeOkHttpClient.getUnsafeOkHttpClient();

    // ... full access to customize client
    NetworkingModule mNetworkingModule = new NetworkingModule(context, null, client);
    return mNetworkingModule;

  }

}
